﻿using Cms.Core.Infrastructure.Common;
using Cms.Core.Infrastructure.Entity;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace Cms.Core.Application.Service.PermissionInfo.Dto
{
    /// <summary>
    /// 权限DTO
    /// </summary>
  public  class PermissionDto : EntityDto
    {


        /// <summary>
        /// 级别
        /// </summary>
        public int Level { get; set; }

        /// <summary>
        /// 加个级别
        /// </summary>

        public string Code { get; set; }
        /// <summary>
        /// 菜单显示名（如用户页、编辑(按钮)、删除(按钮)）
        /// </summary>
        public string Name { get; set; }


        /// <summary>
        /// 上一级菜单（0表示上一级无菜单）
        /// </summary>
        public Guid? ParentId { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int OrderSort { get; set; }
        /// <summary>
        /// 菜单图标
        /// </summary>
        public string Icon { get; set; }


        /// <summary>
        /// 菜单描述    
        /// </summary>
        public string Description { get; set; }
        /// <summary>
        /// 激活状态
        /// </summary>
        public bool IsEnabled { get; set; }

        /// <summary>
        /// 
        /// </summary>

        public PermissionType Type { get; set; }

        /// <summary>
        /// 是否显示 
        /// </summary>
        public bool IsDisplay { get; set; }

        /// <summary>
        /// 方法名,方法标识
        /// </summary>
        public string Action { get; set; }

        /// <summary>
        /// 模块ID
        /// </summary>
        [NotMapped]
        public Guid? ModuleId { get; set; }

        /// <summary>
        /// 父名字
        /// </summary>
        [NotMapped]
        public string ParentName { get; set; }
    }
}
